<!--conf
<sample>
               <product version="3.0" edition="std"/>
                       <modifications>
                               <modified date="110701"/>
                       </modifications>
               </sample>
 -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<title>Grid linked to Combo</title>
</head>

<body>
	<div id="combo_here1" style="width:600px; height:270px; background-color:white;"></div>
	<div id="gridbox" style="width:600px; height:270px; background-color:white;"></div>

<script>
	var list1 = new dhtmlXDataStore({
		url:"../common/data/data.json",
		datatype:"json"
	});
	list1.data.scheme({
		$init:function(obj){
			obj.value = obj.id;
			obj.text = obj.Package;
		}
	});

	dhtmlx.image_path = "../../..//dhtmlxCombo/codebase/imgs/";
    combo1 = new dhtmlXCombo("combo_here1","combo1","100%");
	combo1.sync(list1);

	
    mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.setSkin("dhx_skyblue")
	mygrid.setHeader("Package,Maintainer");
	mygrid.setColumnIds("Package,Maintainer");
	mygrid.init();
	mygrid.sync(list1);
	mygrid.bind(combo1, function(data, filter){
		return mygrid.cells(data, 0).getValue() == filter.text;
	});
	
	

</script>




</body>
</html>
